#include <QtCore>
#include <QtGui/QApplication>
#include "mainwindow.h"

#include "Settings.h"

#include "libclass/IntegerField.h"
#include "libclass/StringField.h"
#include "libclass/BaseField.h"
#include "libclass/ClassifierPassport.h"
#include "libclass/Classifier.h"

Classifier * InitPassport()
{
    ClassifierPassport* passport = new ClassifierPassport("OKATO");
    passport->addField(IntegerField("KOD1", 2));
    passport->addField(IntegerField("KOD2", 2));
    passport->addField(StringField("KOD3", 2));

    return new Classifier("OKATO", passport);
}

MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
{

   IntegerField f("Test", 5);
   Classifier *ps = InitPassport();

   qDebug() << f.toString();

   qDebug() << ps->toString();

   BaseField ff = ps->getPassport()->getField("KOD11");
   qDebug() << ps->getPassport()->getField("KOD11").toString();


   delete ps;

}

MainWindow::~MainWindow()
{

}


